var logger = require("pomelo-logger").getLogger(__filename);

module.exports = function (app) {
    return new ServerRemote(app);
};

var ServerRemote = function (app) {
    this.app = app;
};

// 关闭服务器
ServerRemote.prototype.close = function (msg, callback) {
    logger.info("close server msg=" + JSON.stringify(msg));
    this.app.set("closing", true);
    callback({
        resultCode: 0,
        message: "ok"
    });
};
